<script src="<?=base_url(); ?>theme/js/main.js"></script>
<h3>Buscador de productos</h3>
<div class="widget_wrap">
	<div class="form_container">
	    <ul>
			<li>
    			<div class="form_grid_12">
    				<div class="form_input">
        				<form id="listProducts" action="#" >
        					<div class="form_grid_4 alpha">
        						<input id="code" name="code" type="text" value="<?php echo $code; ?>" />
        						<span class=" label_intro">Código</span>
        					</div>
        					<div class="form_grid_6 ">
        						<input id="description" name="description" type="text" value="<?php echo $description ?>" />
        						<span class=" label_intro">Descripción</span>
        					</div>
        					<div class="form_grid_2 ">
        					<button id="searchProducts" type="submit" class="btn_small btn_blue"><span>Buscar</span></button>
        					</div>
    					</form>
    					<span class="clear"></span>
    				</div>
    			</div>
			</li>
		</ul>
	</div>
    
	<div class="widget_content">
		<table id="" class="wtbl_list">
    		<thead>
        		<tr>
        			<th>Código</th>
        			<th>Descripción</th>
        		</tr>
    		</thead>
    		<tbody>

    		    <?php  
                foreach ($products as $p) : ?>
                    <tr class="tr_even itemProducts " codeProduct="<?php echo $p->code ?>" style="cursor: pointer;">
        			<td><?php echo $p->code ?></td>
        			<td class="descriptionProduct"><?php echo $p->description ?></td>
        		</tr>
        		<?php endforeach; ?>

              
    		</tbody>
		</table>
	</div>
</div>